From 63524b0e43fb3da2f65bf3cb0c4802ec9e26ad84 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Wed, 17 Jun 2009 07:37:26 +0100 Subject: [PATCH] xend: pass-through: Use generic code in pci_opts_list_to_sxp() Use dev_dict_to_sxp() inside pci_opts_list_to_sxp() now that it is available. Signed-off-by: Simon Horman --- tools/python/xen/util/pci.py | 2 +- tools/python/xen/xend/XendSXPDev.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/python/xen/util/pci.py b/tools/python/xen/util/pci.py index 604cff589a..260ad7f2a9 100644 --- a/tools/python/xen/util/pci.py +++ b/tools/python/xen/util/pci.py @@ -136,7 +136,7 @@ def split_pci_opts(opts): filter(lambda x: x != '', opts.split(','))) def pci_opts_list_to_sxp(list): - return ['dev'] + map(lambda x: ['opts', x], list) + return dev_dict_to_sxp({'opts': list}) def pci_opts_list_from_sxp(dev): return map(lambda x: sxp.children(x)[0], sxp.children(dev, 'opts')) diff --git a/tools/python/xen/xend/XendSXPDev.py b/tools/python/xen/xend/XendSXPDev.py index dac5e6c3b0..f145701ea8 100644 --- a/tools/python/xen/xend/XendSXPDev.py +++ b/tools/python/xen/xend/XendSXPDev.py @@ -4,7 +4,6 @@ import types -# This includes a generic equivalent of pci_opts_list_to_sxp() def dev_dict_to_sxp(dev): def f((key, val)): if isinstance(val, types.ListType): -- 2.30.2